package com.slz3.business.module.drawManagement.draIntegralLottery.steward;

import com.slz3.business.module.drawManagement.draFreeLottery.domain.DraFreeLotteryCondition;
import com.slz3.business.module.drawManagement.draIntegralLottery.domain.DraIntegralLottery;
import com.slz3.business.module.drawManagement.draIntegralLottery.domain.DraIntegralLotteryCondition;
import org.springframework.stereotype.Component;
import org.springframework.web.reactive.function.server.ServerRequest;
import org.springframework.web.reactive.function.server.ServerResponse;
import reactor.core.publisher.Mono;

import javax.annotation.Resource;

@Component
public class DraIntegralLotteryResponse {

    @Resource
    private DraIntegralLotteryResController draIntegralLotteryResController;

    public  Mono<ServerResponse> add(ServerRequest req) {
        return req.bodyToMono(DraIntegralLottery.class).flatMap(draIntegralLottery ->
                draIntegralLotteryResController.add(req, draIntegralLottery)
        );
    }

    public  Mono<ServerResponse> delete(ServerRequest req) {
        return req.bodyToMono(DraIntegralLotteryCondition.class).flatMap(draIntegralLotteryCondition ->
                draIntegralLotteryResController.delete(req, draIntegralLotteryCondition)
        );
    }

    public  Mono<ServerResponse> modify(ServerRequest req) {
        return req.bodyToMono(DraIntegralLottery.class).flatMap(draIntegralLottery ->
                draIntegralLotteryResController.modify(req, draIntegralLottery)
        );
    }


    public  Mono<ServerResponse> list(ServerRequest req) {
        return draIntegralLotteryResController.list(req);
    }

    public  Mono<ServerResponse> info(ServerRequest req) {
        return draIntegralLotteryResController.info(req);
    }

    public  Mono<ServerResponse> choice(ServerRequest req) {
        return draIntegralLotteryResController.choice(req);
    }

    public  Mono<ServerResponse> auditSubmit(ServerRequest req) {
        return req.bodyToMono(DraIntegralLotteryCondition.class).flatMap(draIntegralLotteryCondition ->
                draIntegralLotteryResController.auditSubmit(req, draIntegralLotteryCondition)
        );
    }

    public  Mono<ServerResponse> audit(ServerRequest req) {
        return req.bodyToMono(DraIntegralLotteryCondition.class).flatMap(draIntegralLotteryCondition ->
                draIntegralLotteryResController.audit(req, draIntegralLotteryCondition)
        );
    }

    public  Mono<ServerResponse> auditReject(ServerRequest req) {
        return req.bodyToMono(DraIntegralLotteryCondition.class).flatMap(draIntegralLotteryCondition ->
                draIntegralLotteryResController.auditReject(req, draIntegralLotteryCondition)
        );
    }

    public  Mono<ServerResponse> usingEnable(ServerRequest req) {
        return req.bodyToMono(DraIntegralLotteryCondition.class).flatMap(draIntegralLotteryCondition ->
                draIntegralLotteryResController.usingEnable(req, draIntegralLotteryCondition)
        );
    }

    public  Mono<ServerResponse> usingDisable(ServerRequest req) {
        return req.bodyToMono(DraIntegralLotteryCondition.class).flatMap(draIntegralLotteryCondition ->
                draIntegralLotteryResController.usingDisable(req, draIntegralLotteryCondition)
        );
    }

    public Mono<ServerResponse> lottery(ServerRequest req) {
        return req.bodyToMono(DraIntegralLotteryCondition.class).flatMap(draIntegralLotteryCondition ->
                draIntegralLotteryResController.lottery(req, draIntegralLotteryCondition)
        );
    }
}
